const express = require('express');
const router = express.Router();

router.get('/forCurrentUser', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `${i}`,
        code: `code${i}`,
        dealerCode: `dealerCode${i}`,
        brandCode: `brandCode${i}`,
        name: 'name',
        gender: 1,
        cellPhoneNumber: '3124124',
        intentLevel: 1,
        productCategoryCode: 'dfgshsad12',
        intentionalVehicle: '23134ds',
        mainDataSource: 1,
        status: 1,
        rowVersion: 'string',
        options: ['abandon', 'export']
    });

    res.json({
        message: 'ok',
        payload: {
            content,
            totalElements: 40,
        }
    });
});

router.get('/:id', (req, res) => {
    res.json({
        message: 'ok',
        payload: {
            id: '001',
            name: 'name',
            gender: 2,
            birthday: '2020-04-09T02:19:40.733Z',
            cellPhoneNumber: '031565413',
            address: 'address',
            email: 'email',
            type: 1,
            code: 'code',
            brandName: 'brandName001',
            dealerCode: 'dealerCode001',
            intentLevel: 1,
            productCategoryCode: 'productCategoryCode001',
            intentionalVehicle: 'intentionalVehicle001',
            hobby: 1,
            mainDataSource: 1,
            subdivisionDataSource: 1,
            personality: 'personality',
            otherBrand: 'otherBrand',
            otherModel: 'otherModel',
            isTestDrive: true,
            isQuotation: false,
            otherPreferredVehicleModel: 'otherPreferredVehicleModel',
            salesLeadCode: 'salesLeadCode',
            remark: 'remark',
            creator: 'creator',
            createTime: '2020-04-09T02:19:40.733Z',
            modifierName: 'modifierName',
            modifyTime: '2020-04-09T02:19:40.733Z',
            abandonerName: 'abandonerName',
            abandonTime: '2020-04-09T02:19:40.733Z',
            options: ['abandon', 'export'],
            rowVersion: 'string'
        },
    });
});
router.post('/import', async(req, res) => {
    res.json({
        message: '导入潜客信息成功'
    });
});
router.get('/:id/abandon', (req, res) => {
    res.json({
        message: '作废成功'
    });
});
router.get('/export/forCurrentUser', (req, res) => {
    res.json({
        message: '导出成功'
    });
});
module.exports = router;
